package com.ruoyi.miaomiao.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * miaomiao用户管理对象 f_user
 * 
 * @author ruoyi
 * @date 2022-07-26
 */
public class CommonUser extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 用户id */
    private Long userId;

    /** 用户微信id */
    @Excel(name = "用户微信id")
    private String userOpenid;

    /** 用户手机号 */
    @Excel(name = "用户手机号")
    private String userPhonenumber;

    /** 用户昵称 */
    @Excel(name = "用户昵称")
    private String userName;

    /** 用户生日 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "用户生日", width = 30, dateFormat = "yyyy-MM-dd")
    private Date userBirthday;

    /** 用户性别（1-男，0-女） */
    @Excel(name = "用户性别", readConverterExp = "1=-男，0-女")
    private String userSex;

    /** 用户头像 */
    @Excel(name = "用户头像")
    private String userCover;

    /** 更新人 */
    @Excel(name = "更新人")
    private String updater;

    /** 最近登录时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最近登录时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date loginTime;

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setUserOpenid(String userOpenid)
    {
        this.userOpenid = userOpenid;
    }

    public String getUserOpenid()
    {
        return userOpenid;
    }
    public void setUserPhonenumber(String userPhonenumber) 
    {
        this.userPhonenumber = userPhonenumber;
    }

    public String getUserPhonenumber() 
    {
        return userPhonenumber;
    }
    public void setUserName(String userName) 
    {
        this.userName = userName;
    }

    public String getUserName() 
    {
        return userName;
    }
    public void setUserBirthday(Date userBirthday) 
    {
        this.userBirthday = userBirthday;
    }

    public Date getUserBirthday() 
    {
        return userBirthday;
    }
    public void setUserSex(String userSex) 
    {
        this.userSex = userSex;
    }

    public String getUserSex() 
    {
        return userSex;
    }
    public void setUserCover(String userCover) 
    {
        this.userCover = userCover;
    }

    public String getUserCover() 
    {
        return userCover;
    }
    public void setUpdater(String updater) 
    {
        this.updater = updater;
    }

    public String getUpdater() 
    {
        return updater;
    }
    public void setLoginTime(Date loginTime) 
    {
        this.loginTime = loginTime;
    }

    public Date getLoginTime() 
    {
        return loginTime;
    }

    /**
     * 有些数据不方便传到前端
     */
    public void setNull(){
        this.userId = null;
        this.userOpenid = null;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("userId", getUserId())
            .append("userOpenid", getUserOpenid())
            .append("userPhonenumber", getUserPhonenumber())
            .append("userName", getUserName())
            .append("userBirthday", getUserBirthday())
            .append("userSex", getUserSex())
            .append("userCover", getUserCover())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("updater", getUpdater())
            .append("loginTime", getLoginTime())
            .toString();
    }
}
